<ol id="sections">
    <li class="section">
        <div class="dp-content">
            <div id="profile">
                <div id="left-block">
                    <div class="question-answer">
                        <h3 class="question-title"><?php echo $question->getEnquiry() ?></h3>
                        <?php if ($sf_user->isAuthenticated() && $sf_user->getType() == 'Doctor'): ?>
                            <div id="answer-button">
                                <button id="invoke-answer-form" class="blue-button-25" type="submit" answerid="9">Answer</button>
                            </div>
                        <?php endif; ?>
                    </div>
                    <div id="question-answers">
                        <?php include_partial("answer/list", array("answers" => $question->getAnswers(), "howMany" => "single", "form" => $form)) ?>
                    </div>
                </div>
                <div id="right-block">
                    <?php include_component("profile", "rightBlock") ?>
                </div>
            </div>
        </div>
    </li>
</ol>
<div style="display: none;">
    <div id="answer-comment-form-holder"></div>
</div>
<script type="text/javascript">
    $(document).ready(function(){         
        $("#invoke-answer-form").live("click", function(){
            var url = '/answer/new/<?php echo $question->getId() ?>';
            $.get(url, {}, function(data){
                if(data == 'signin'){
                    requestLogin();
                }
                else{
                    openPopup(url, '623px', '480px');
                }
            }, 'html');
        });
    });
</script>